package com.cuit.riskassessment.service.impl;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cuit.riskassessment.dao.rv.RvMapper;
import com.cuit.riskassessment.service.RvService;
import com.cuit.riskassessment.vo.Rv;

@Service(value = "rvService")
public class RvServiceImpl implements RvService {
	@Autowired
	@Resource(name = "rvMapper")
	private RvMapper rvMapper;

	public boolean addOrUpdateRv(Rv rv) {
		if (rv.getId()==null) {
			if (rvMapper.addRv(rv)>0)return true;
		}else {
			if(rvMapper.updateRv(rv)>0)return true;
		}
		return false;
	}

	@Override
	public Rv setRv(Integer pid) {
		// TODO Auto-generated method stub
		return rvMapper.setRv(pid);
	}

}
